<script src="web/assets/plugins/bootstrap-select2/select2.min.js" type="text/javascript"></script>
<script src="web/assets/plugins/jquery-datatable/js/jquery.dataTables.min.js" type="text/javascript" ></script>
<script src="web/assets/js/table_configuracion.js" type="text/javascript"></script>
<script src="./fuentes/view/bleu/js/script_ajax_bleu_evento.js" type="text/javascript"></script>



<div class="clearfix"></div>
<div class="content">  


  
    <div class="row" id="movimiento">
        <div class="col-md-12">
            <div class="grid simple ">
                <div class="grid-title no-border">
                    <h4>Lista de  <span class="semi-bold">Bleu Eventos</span>

                    </h4>
                    <div class="labelRight" id="error">	

                    </div>
                </div>
                <div class="grid-body no-border">

                    <table class="table table-hover no-more-tables table-condensed  " id="bleuEventoTABLE">
                        <thead>
                            <tr>
                                <th style="width:1%">ID</th>
                                <th style="width:15%">Nombre </th>
                                <th style="width:4%">Habilitado Por</th>
                                <th class='text-center' style="width:3%">Total Ingreso</th>
                                <th class='text-center' style="width:3%">Total Invitados</th>
                                <th style="width:4%">Cerrado Por</th>
                               
                            </tr>
                        </thead>
                        <tbody id="bleuEventoList">

                            <?php
 

                            if ($bleuEventos) {
                                foreach ($bleuEventos as $dato) {
                                    echo "<tr >";
                                    echo "<td>";
                                    echo $dato["id"];
                                    echo "</td>";

                                    echo "<td>";
                                    echo $dato["nombre"];
                                    echo "</td>";

                                    foreach ($personas as $datoP) {
                                        if ($datoP['id'] == $dato["habilitado_por"]) {
                                            echo "<td>";
                                            echo $datoP["apenom"];
                                            echo "</td>";
                                        }
                                    }
                                    echo "<td>";
                                    if ($dato["total_ingresos"] != null)
                                        echo $dato["total_ingresos"];
                                    else
                                        echo "0";
                                    echo "</td>";

                                    echo "<td>";
                                    if ($dato["total_invitados"] != null)
                                        echo $dato["total_invitados"];
                                    else
                                        echo "0";
                                    echo "</td>";



                                    if ($dato["total_invitados"] != null) {
                                        foreach ($personas as $datoP) {
                                            if ($datoP['id'] == $dato["cerrado_por"]) {
                                                echo "<td>";
                                                echo $datoP["apenom"];
                                                echo "</td>";
                                            }
                                        }
                                    } else {
                                        echo "<td>";
                                        echo "0";
                                        echo "</td>";
                                    }

                                   
                                    echo " </tr>";
                                }
                            }
                            ?>



                        </tbody>
                    </table>
                </div>
            </div>
        </div>
    </div>



    <!-- END PAGE --> 


</div>




